<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
      <base href="<%=basePath%>"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
      <link rel="shortcut icon" href="statics/images/favicon.ico"
            type="image/x-icon" />
      <link rel="stylesheet" href="statics/css/font.css">
      <link rel="stylesheet" href="statics/css/xadmin.css">
      <script src="statics/js/jquery.min.js"></script>
      <script src="statics/layui.js" charset="UTF-8"></script>
      <script type="text/javascript" src="statics/js/xadmins.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>-->

  </head>
  
  <body>
    <div class="x-body">
    
        <form class="layui-form" >
         
          <div class="layui-form-item" style="width: 800px">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>软件名称
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.softwareName }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>apk名称
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.APKName }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="phone" class="layui-form-label">
                  <span class="x-red">*</span>支持ROM
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="phone" name="phone" required="" lay-verify="phone" value="${appstate.supportROM }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>界面语言
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.interfaceLanguage }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>软件大小
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.softwareSize }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
           <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>下载次数
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.downloads }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
           <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>所属平台
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.pv }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
           <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>所属分类
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.cates }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>app状态
              </label>
              <div class="layui-input-inline" style="width: 500px">
                  <input type="text" id="username" name="username" required="" lay-verify="required" value="${appstate.sv }"
                  autocomplete="off" class="layui-input" style="width: 500px">
              </div>
          </div>
          <div class="layui-form-item layui-form-text">
              <label for="desc" class="layui-form-label">
                  应用简介
              </label>
              <div class="layui-input-block">
                  <textarea placeholder="请输入内容" id="desc" name="desc" class="layui-textarea" >${appstate.infos }</textarea>
              </div>
        
         </div>
          <div class="layui-form-item layui-form-text">
               <label for="desc" class="layui-form-label">
                  历史版本列表
              </label>
              <div class="layui-input-block">
                  <table class="layui-table">
                    <tbody>
                    <tr style="">
                      <th>软件名称</th>
                      <th>版本号</th>
                      <th>版本大小(单位:M)</th>
                      <th>发布状态</th>
                      <th>apk文件下载</th>
                      <th>最新更新时间</th>
                    </tr>
                      
                     <c:forEach items="${ver }" var="ver">
                      <tr>
                       <td>${ver.softwareName}</td>
                       <td>${ver.versionNo}</td>
                       <td>${ver.versionSize}</td>
                       <td>${ver.valueName}</td>
                       <td>${ver.downloadLink}</td>
                       <td>${ver.modifyDate}</td>
                      </tr>
                     </c:forEach>
                    </tbody>
                  </table>
              </div>
          </div>
          
          <div class="layui-form-item">
              <label for="L_repass" class="layui-form-label">
              </label>
              <button  class="layui-btn" lay-filter="back" lay-submit="">
                  返回
              </button>
          </div>
      </form>
    </div>
    <script>
        layui.use(['form','layer'], function(){
            $ = layui.jquery;
          var form = layui.form
          ,layer = layui.layer;
        
          //自定义验证规则
          form.verify({
            nikename: function(value){
              if(value.length < 5){
                return '昵称至少得5个字符啊';
              }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,repass: function(value){
                if($('#L_pass').val()!=$('#L_repass').val()){
                    return '两次密码不一致';
                }
            }
          });

          //监听提交
          form.on('submit(back)', function(data){
            window.parent.hide();
            return false;
          });
          
          
        });
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();</script>
  </body>

</html>